package com.sys.server.modules.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName(value = "oplog")
public class OperLogEntity implements Serializable {

    @TableId(value = "logid", type = IdType.AUTO)
    private Integer logid;

    private String operation;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "`time`")
    private Date time;
    @TableField(value = "`type`")
    private String type;

    private String method;

    private String params;

    private String ip;

    private String uid;

}
